Optimal. Leaf size=177 \[ \frac {2 a^3 (7+4 n) \sec ^{1+n}(e+f x) \sin (e+f x)}{f (1+2 n) (3+2 n) \sqrt {a+a \sec (e+f x)}}+\frac {2 a^2 \sec ^{1+n}(e+f x) \sqrt {a+a \sec (e+f x)} \sin (e+f x)}{f (3+2 n)}+\frac {2 a^3 \left (3+24 n+16 n^2\right ) \, _2F_1\left (\frac {1}{2},1-n;\frac {3}{2};1-\sec (e+f x)\right ) \tan (e+f x)}{f (1+2 n) (3+2 n) \sqrt {a+a \sec (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 177, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3899, 4101,
3891, 67} \begin {gather*} \frac {2 a^3 \left (16 n^2+24 n+3\right ) \tan (e+f x) \, _2F_1\left (\frac {1}{2},1-n;\frac {3}{2};1-\sec (e+f x)\right )}{f (2 n+1) (2 n+3) \sqrt {a \sec (e+f x)+a}}+\frac {2 a^3 (4 n+7) \sin (e+f x) \sec ^{n+1}(e+f x)}{f (2 n+1) (2 n+3) \sqrt {a \sec (e+f x)+a}}+\frac {2 a^2 \sin (e+f x) \sqrt {a \sec (e+f x)+a} \sec ^{n+1}(e+f x)}{f (2 n+3)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 67
Rule 3891
Rule 3899
Rule 4101
Rubi steps
\begin {align*} \int \sec ^n(e+f x) (a+a \sec (e+f x))^{5/2} \, dx &=\frac {2 a^2 \sec ^{1+n}(e+f x) \sqrt {a+a \sec (e+f x)} \sin (e+f x)}{f (3+2 n)}+\frac {(2 a) \int \sec ^n(e+f x) \sqrt {a+a \sec (e+f x)} \left (a \left (\frac {3}{2}+2 n\right )+a \left (\frac {7}{2}+2 n\right ) \sec (e+f x)\right ) \, dx}{3+2 n}\\ &=\frac {2 a^3 (7+4 n) \sec ^{1+n}(e+f x) \sin (e+f x)}{f (1+2 n) (3+2 n) \sqrt {a+a \sec (e+f x)}}+\frac {2 a^2 \sec ^{1+n}(e+f x) \sqrt {a+a \sec (e+f x)} \sin (e+f x)}{f (3+2 n)}+\frac {\left (a^2 \left (3+24 n+16 n^2\right )\right ) \int \sec ^n(e+f x) \sqrt {a+a \sec (e+f x)} \, dx}{3+8 n+4 n^2}\\ &=\frac {2 a^3 (7+4 n) \sec ^{1+n}(e+f x) \sin (e+f x)}{f (1+2 n) (3+2 n) \sqrt {a+a \sec (e+f x)}}+\frac {2 a^2 \sec ^{1+n}(e+f x) \sqrt {a+a \sec (e+f x)} \sin (e+f x)}{f (3+2 n)}-\frac {\left (a^4 \left (3+24 n+16 n^2\right ) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {x^{-1+n}}{\sqrt {a-a x}} \, dx,x,\sec (e+f x)\right )}{f \left (3+8 n+4 n^2\right ) \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=\frac {2 a^3 (7+4 n) \sec ^{1+n}(e+f x) \sin (e+f x)}{f (1+2 n) (3+2 n) \sqrt {a+a \sec (e+f x)}}+\frac {2 a^2 \sec ^{1+n}(e+f x) \sqrt {a+a \sec (e+f x)} \sin (e+f x)}{f (3+2 n)}+\frac {2 a^3 \left (3+24 n+16 n^2\right ) \, _2F_1\left (\frac {1}{2},1-n;\frac {3}{2};1-\sec (e+f x)\right ) \tan (e+f x)}{f \left (3+8 n+4 n^2\right ) \sqrt {a+a \sec (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 11.15, size = 435, normalized size = 2.46 \begin {gather*} -\frac {i 2^{-\frac {5}{2}+n} e^{-i \left (\frac {1}{2}+n\right ) (e+f x)} \left (\frac {e^{i (e+f x)}}{1+e^{2 i (e+f x)}}\right )^{\frac {1}{2}+n} \left (1+e^{2 i (e+f x)}\right )^{\frac {1}{2}+n} \left (\frac {10 e^{i (2+n) (e+f x)} \, _2F_1\left (1+\frac {n}{2},\frac {5}{2}+n;2+\frac {n}{2};-e^{2 i (e+f x)}\right )}{2+n}+\frac {5 e^{i (4+n) (e+f x)} \, _2F_1\left (2+\frac {n}{2},\frac {5}{2}+n;3+\frac {n}{2};-e^{2 i (e+f x)}\right )}{4+n}+\frac {e^{i n (e+f x)} \, _2F_1\left (\frac {n}{2},\frac {5}{2}+n;1+\frac {n}{2};-e^{2 i (e+f x)}\right )}{n}+\frac {5 e^{i (1+n) (e+f x)} \, _2F_1\left (\frac {1+n}{2},\frac {5}{2}+n;\frac {3+n}{2};-e^{2 i (e+f x)}\right )}{1+n}+\frac {10 e^{i (3+n) (e+f x)} \, _2F_1\left (\frac {5}{2}+n,\frac {3+n}{2};\frac {5+n}{2};-e^{2 i (e+f x)}\right )}{3+n}+\frac {e^{i (5+n) (e+f x)} \, _2F_1\left (\frac {5}{2}+n,\frac {5+n}{2};\frac {7+n}{2};-e^{2 i (e+f x)}\right )}{5+n}\right ) \sec ^5\left (\frac {1}{2} (e+f x)\right ) (a (1+\sec (e+f x)))^{5/2}}{f \sec ^{\frac {5}{2}}(e+f x)} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.09, size = 0, normalized size = 0.00 \[\int \left (\sec ^{n}\left (f x +e \right )\right ) \left (a +a \sec \left (f x +e \right )\right )^{\frac {5}{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{5/2}\,{\left (\frac {1}{\cos \left (e+f\,x\right )}\right )}^n \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________